package cz.vargagab.domain;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * Class representing a message about something that happens in the system
 * @author Gabriel Varga
 *
 */
public class LogObject {

	// format vypisu
	SimpleDateFormat format = new SimpleDateFormat("dd-MM-yyyy hh:mm:ss:SSS");
	
	@SuppressWarnings("unused")
	private String timeMillis;
	private Date time;
	private String text;
	public Date getTime() {
		return time;
	}
	public void setTime(Date time) {
		this.time = time;
	}
	public String getText() {
		return text;
	}
	public void setText(String text) {
		this.text = text;
	}
	public LogObject(Date time, String text) {
		super();
		this.time = time;
		this.text = text;
	}
	
	public LogObject(String text) {
		super();
		this.time = new Date();
		this.text = text;
	}
	public LogObject() {
		super();
	}
	
	public String getTimeMillis() {
		return format.format(time);
	}
	public void setTimeMillis(String timeMillis) {
		this.timeMillis = timeMillis;
	}
	
}
